package com.cuit.mimall.service;

import com.cuit.mimall.common.R;
import com.cuit.mimall.entity.LoginUser;
import com.cuit.mimall.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author star
 * @since 2023-07-01
 */
public interface IUserService extends IService<User> {
    /**
     * 获取当前登录用户
     */
    LoginUser getCurrentUser();

    R<?> getUsersByStatus(Integer state, Integer pageNum, Integer pageSize);

    R<?> getUsers(Integer pageNum, Integer pageSize);

    R<?> info();

    //用户更新密码操作
     public boolean updatePasswordByUserId(Long userId,String oldPassword,String newPassword, String confirmPassword) ;

     //用户信息修改
    public boolean updateUserInformation(Long userId, String nickNane, String email, String phoneNumber);


    R<?> addUser(User user);

    R<?> updateUser(User user);
}
